-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add create retrieve and update api endpoints for organization resource #5361
feat: add create retrieve and update api endpoints for organization resource #5361
Conversation
…n-create-retrieve-update-endpoints
…n-create-retrieve-update-endpoints
…n-create-retrieve-update-endpoints
crates/hyperswitch_domain_models/src/payments/payment_attempt.rs
Outdated
Show resolved
Hide resolved
…n-create-retrieve-update-endpoints
Self(organization_id) | ||
} | ||
|
||
/// Get the string representation of customer id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you replace the instances of customer id with organization id?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will be done in this PR: #5380
#[cfg(all(any(feature = "v1", feature = "v2"), not(feature = "payment_v2")))] | ||
use common_utils::types::keymanager::KeyManagerState; | ||
#[cfg(all(feature = "v2", feature = "payment_v2"))] | ||
use common_utils::types::keymanager::KeyManagerState; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the feature gating required for this import? since we are using KeyManagerState in both the features
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cargo clippy --no-default-features will say unused imports.
#[cfg(all( | ||
any(feature = "v1", feature = "v2"), | ||
not(feature = "merchant_account_v2") | ||
))] | ||
use common_utils::id_type; | ||
#[cfg(all(feature = "v2", feature = "merchant_account_v2"))] | ||
use common_utils::id_type; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can use the type alias where the type is used, this feature gating for imports can be avoided
* 'main' of github.com:juspay/hyperswitch: (27 commits) refactor(connector): added amount conversion framework for billwerk (#4972) feat(connector): [Itaubank] Add refund and rsync flow (#5420) feat: create additional columns in organization table (#5380) refactor(merchant_id): create domain type for `merchant_id` (#5408) fix(euclid): remove business_profile routing feature flag (#5430) feat: add create retrieve and update api endpoints for organization resource (#5361) chore(version): 2024.07.24.0 refactor(connector): [Itaubank] add dynamic fields for pix (#5419) Feat(connector): [WELLSFARGO] Add template code (#5333) fix(connector): [Datatrans] Handling for 4-Digit YYYY input and Correct 3DS Routing to no_3ds (#5410) refactor(connector): add amount conversion framework to volt (#4985) chore(users): email templates footer icon style enhance (#5375) feat(customer): customer v2 refactor for customer create end point (#5350) chore(version): 2024.07.23.0 fix(router): store `network_transaction_id` in stripe `authorize` flow (#5399) ci: handle packages to run are being empty (#5403) chore: add customer, shipping and billing details to payment_response for payment list api (#5401) refactor(dashboard_metadata): alter query for merchant scoped metadata (#5397) refactor(connector): Add billing_country in klarna dynamic fields (#5373) feat(connector): [Itau Bank] Add payment and sync flow for Pix (#5342) ...
Type of Change
Description
Added
/organization
route to do crud operation on organization table.Authentication method for
/organization
will beadmin-api-key
Also generated openapi spec for the new api models and endpoints.
New Routes:
create: POST->
{base_url}/organization/
retrieve: Get->
{base_url}/organization/:id
update: Put->
{base_url}/organization/:id
Additional Changes
Motivation and Context
How did you test it?
Manual
Response:
Response:
Response:
DB screenshot.
Checklist
cargo +nightly fmt --all
cargo clippy